home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / toaplan1.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  77KB  |  2,082 lines

  1. /***************************************************************************
  2.  
  3.         ToaPlan game hardware from 1988-1991
  4.         ------------------------------------
  5.         MAME Driver by: Darren Olafson
  6.         Technical info: Carl-Henrik Skårstedt  &  Magnus Danielsson
  7.         Driver updates: Quench
  8.         Video updates : SUZ
  9.  
  10.  
  11. Supported games:
  12.  
  13.     ROM set        Toaplan
  14.     name        board No        Game name
  15.     --------------------------------------------------
  16.     rallybik    TP-012        Rally Bike/Dash Yarou
  17.     truxton        TP-013B        Truxton/Tatsujin
  18.     hellfire    TP-???        HellFire
  19.     zerowing    TP-015        Zero Wing
  20.     demonwld    TP-016        Demon's World/Horror Story
  21.     samesame    TP-017        Same Same Same! (Japan)     [1989]
  22.     fireshrk    TP-017        Fire Shark (World)         [1990]
  23.     outzone        TP-018        Out Zone
  24.     outzonep    ??????        Out Zone (Pirate).  Note this uses different ROM
  25.                               layout for GFX ROMs. Result is the same though.
  26.                               See ROM load for details.
  27.     vimana        TP-019        Vimana
  28.     vimana2        TP-019        Vimana (alternate)
  29.     vimanan        TP-019        Vimana (Nova Apparate GMBH & Co  license)
  30.  
  31. To Do:
  32.     Add support for HD647180 (Z180) sound CPUs (once their internal
  33.     ROMS are dumped). These are:
  34.         Fire Shark
  35.         Vimana
  36.  
  37. ***************************************************************************/
  38.  
  39. #include "driver.h"
  40. #include "vidhrdw/generic.h"
  41.  
  42.  
  43. /**************** Machine stuff ******************/
  44. int  toaplan1_interrupt(void);
  45. WRITE_HANDLER( toaplan1_int_enable_w );
  46. READ_HANDLER( toaplan1_shared_r );
  47. WRITE_HANDLER( toaplan1_shared_w );
  48. READ_HANDLER( toaplan1_unk_r );
  49. READ_HANDLER( samesame_port_6_r );
  50. READ_HANDLER( vimana_mcu_r );
  51. WRITE_HANDLER( vimana_mcu_w );
  52. READ_HANDLER( vimana_input_port_5_r );
  53.  
  54. READ_HANDLER( demonwld_dsp_r );
  55. WRITE_HANDLER( demonwld_dsp_w );
  56. WRITE_HANDLER( demonwld_dsp_ctrl_w );
  57.  
  58. void toaplan1_init_machine(void);
  59.  
  60. WRITE_HANDLER( rallybik_coin_w );
  61. WRITE_HANDLER( toaplan1_coin_w );
  62.  
  63. unsigned char *toaplan1_sharedram;
  64.  
  65.  
  66. /**************** Video stuff ******************/
  67. READ_HANDLER( toaplan1_vblank_r );
  68. WRITE_HANDLER( toaplan1_flipscreen_w );
  69.  
  70. READ_HANDLER( toaplan1_videoram1_r );
  71. WRITE_HANDLER( toaplan1_videoram1_w );
  72. READ_HANDLER( toaplan1_videoram2_r );
  73. WRITE_HANDLER( toaplan1_videoram2_w );
  74. READ_HANDLER( rallybik_videoram3_r );
  75. READ_HANDLER( toaplan1_videoram3_r );
  76. WRITE_HANDLER( toaplan1_videoram3_w );
  77. READ_HANDLER( toaplan1_colorram1_r );
  78. WRITE_HANDLER( toaplan1_colorram1_w );
  79. READ_HANDLER( toaplan1_colorram2_r );
  80. WRITE_HANDLER( toaplan1_colorram2_w );
  81.  
  82. READ_HANDLER( video_ofs_r );
  83. WRITE_HANDLER( video_ofs_w );
  84. READ_HANDLER( video_ofs3_r );
  85. WRITE_HANDLER( video_ofs3_w );
  86. READ_HANDLER( scrollregs_r );
  87. WRITE_HANDLER( scrollregs_w );
  88. WRITE_HANDLER( offsetregs_w );
  89. WRITE_HANDLER( layers_offset_w );
  90.  
  91. void toaplan1_eof_callback(void);
  92. void rallybik_eof_callback(void);
  93. void samesame_eof_callback(void);
  94. int  toaplan1_vh_start(void);
  95. void toaplan1_vh_stop(void);
  96. int  rallybik_vh_start(void);
  97. void rallybik_vh_stop(void);
  98. void toaplan1_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  99. void rallybik_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  100.  
  101. extern unsigned char *toaplan1_colorram1;
  102. extern unsigned char *toaplan1_colorram2;
  103. extern size_t colorram1_size;
  104. extern size_t colorram2_size;
  105.  
  106.  
  107.  
  108.  
  109. static struct MemoryReadAddress rallybik_readmem[] =
  110. {
  111.     { 0x000000, 0x07ffff, MRA_ROM },
  112.     { 0x080000, 0x083fff, MRA_BANK1 },
  113.     { 0x0c0000, 0x0c0fff, MRA_BANK2 },                /* sprite ram data */
  114.     { 0x100002, 0x100003, video_ofs3_r },
  115.     { 0x100004, 0x100007, rallybik_videoram3_r },    /* tile layers */
  116.     { 0x100010, 0x10001f, scrollregs_r },
  117.     { 0x140000, 0x140001, input_port_0_r },
  118.     { 0x144000, 0x1447ff, toaplan1_colorram1_r },
  119.     { 0x146000, 0x1467ff, toaplan1_colorram2_r },
  120.     { 0x180000, 0x180fff, toaplan1_shared_r },
  121.     { -1 }
  122. };
  123. static struct MemoryWriteAddress rallybik_writemem[] =
  124. {
  125.     { 0x000000, 0x07ffff, MWA_ROM },
  126.     { 0x080000, 0x083fff, MWA_BANK1 },
  127.     { 0x0c0000, 0x0c0fff, MWA_BANK2, &spriteram, &spriteram_size },    /* sprite ram data */
  128.     { 0x100002, 0x100003, video_ofs3_w },
  129.     { 0x100004, 0x100007, toaplan1_videoram3_w },    /* tile layers */
  130.     { 0x100010, 0x10001f, scrollregs_w },
  131.     { 0x140000, 0x140001, toaplan1_int_enable_w },
  132.     { 0x140008, 0x14000f, layers_offset_w },
  133.     { 0x144000, 0x1447ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  134.     { 0x146000, 0x1467ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  135.     { 0x180000, 0x180fff, toaplan1_shared_w, &toaplan1_sharedram },
  136.     { 0x1c0000, 0x1c0003, offsetregs_w },
  137.     { -1 }
  138. };
  139.  
  140. static struct MemoryReadAddress truxton_readmem[] =
  141. {
  142.     { 0x000000, 0x07ffff, MRA_ROM },
  143.     { 0x080000, 0x083fff, MRA_BANK1 },
  144.     { 0x0c0000, 0x0c0001, input_port_0_r },
  145.     { 0x0c0002, 0x0c0003, video_ofs_r },
  146.     { 0x0c0004, 0x0c0005, toaplan1_videoram1_r },    /* sprites info */
  147.     { 0x0c0006, 0x0c0007, toaplan1_videoram2_r },    /* sprite size ? */
  148.     { 0x100002, 0x100003, video_ofs3_r },
  149.     { 0x100004, 0x100007, toaplan1_videoram3_r },    /* tile layers */
  150.     { 0x100010, 0x10001f, scrollregs_r },
  151.     { 0x144000, 0x1447ff, toaplan1_colorram1_r },
  152.     { 0x146000, 0x1467ff, toaplan1_colorram2_r },
  153.     { 0x180000, 0x180fff, toaplan1_shared_r },
  154.     { -1 }
  155. };
  156. static struct MemoryWriteAddress truxton_writemem[] =
  157. {
  158.     { 0x000000, 0x07ffff, MWA_ROM },
  159.     { 0x080000, 0x083fff, MWA_BANK1 },
  160.     { 0x0c0002, 0x0c0003, video_ofs_w },
  161.     { 0x0c0004, 0x0c0005, toaplan1_videoram1_w },    /* sprites info */
  162.     { 0x0c0006, 0x0c0007, toaplan1_videoram2_w },    /* sprite size ? */
  163.     { 0x100002, 0x100003, video_ofs3_w },
  164.     { 0x100004, 0x100007, toaplan1_videoram3_w },    /* tile layers */
  165.     { 0x100010, 0x10001f, scrollregs_w },
  166.     { 0x140000, 0x140001, toaplan1_int_enable_w },
  167.     { 0x140008, 0x14000f, layers_offset_w },
  168.     { 0x144000, 0x1447ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  169.     { 0x146000, 0x1467ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  170.     { 0x180000, 0x180fff, toaplan1_shared_w, &toaplan1_sharedram },
  171.     { 0x1c0000, 0x1c0003, offsetregs_w },
  172.     { 0x1c0006, 0x1c0007, toaplan1_flipscreen_w },
  173.     { -1 }
  174. };
  175.  
  176. static struct MemoryReadAddress hellfire_readmem[] =
  177. {
  178.     { 0x000000, 0x03ffff, MRA_ROM },
  179.     { 0x040000, 0x047fff, MRA_BANK1 },
  180.     { 0x084000, 0x0847ff, toaplan1_colorram1_r },
  181.     { 0x086000, 0x0867ff, toaplan1_colorram2_r },
  182.     { 0x0c0000, 0x0c0fff, toaplan1_shared_r },
  183.     { 0x100002, 0x100003, video_ofs3_r },
  184.     { 0x100004, 0x100007, toaplan1_videoram3_r },    /* tile layers */
  185.     { 0x100010, 0x10001f, scrollregs_r },
  186.     { 0x140000, 0x140001, input_port_0_r },
  187.     { 0x140002, 0x140003, video_ofs_r },
  188.     { 0x140004, 0x140005, toaplan1_videoram1_r },    /* sprites info */
  189.     { 0x140006, 0x140007, toaplan1_videoram2_r },    /* sprite size ? */
  190.     { -1 }    /* end of table */
  191. };
  192. static struct MemoryWriteAddress hellfire_writemem[] =
  193. {
  194.     { 0x000000, 0x03ffff, MWA_ROM },
  195.     { 0x040000, 0x047fff, MWA_BANK1 },
  196.     { 0x080002, 0x080003, toaplan1_int_enable_w },
  197.     { 0x080008, 0x08000f, layers_offset_w },
  198.     { 0x084000, 0x0847ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  199.     { 0x086000, 0x0867ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  200.     { 0x0c0000, 0x0c0fff, toaplan1_shared_w, &toaplan1_sharedram },
  201.     { 0x100002, 0x100003, video_ofs3_w },
  202.     { 0x100004, 0x100007, toaplan1_videoram3_w },    /* tile layers */
  203.     { 0x100010, 0x10001f, scrollregs_w },
  204.     { 0x140002, 0x140003, video_ofs_w },
  205.     { 0x140004, 0x140005, toaplan1_videoram1_w },    /* sprites info */
  206.     { 0x140006, 0x140007, toaplan1_videoram2_w },    /* sprite size ? */
  207.     { 0x180000, 0x180003, offsetregs_w },
  208.     { 0x180006, 0x180007, toaplan1_flipscreen_w },
  209.     { -1 }    /* end of table */
  210. };
  211.  
  212. static struct MemoryReadAddress zerowing_readmem[] =
  213. {
  214.     { 0x000000, 0x07ffff, MRA_ROM },
  215.     { 0x080000, 0x087fff, MRA_BANK1 },
  216.     { 0x400000, 0x400005, toaplan1_unk_r },
  217.     { 0x404000, 0x4047ff, toaplan1_colorram1_r },
  218.     { 0x406000, 0x4067ff, toaplan1_colorram2_r },
  219.     { 0x440000, 0x440fff, toaplan1_shared_r },
  220.     { 0x480002, 0x480003, video_ofs3_r },
  221.     { 0x480004, 0x480007, toaplan1_videoram3_r },    /* tile layers */
  222.     { 0x480010, 0x48001f, scrollregs_r },
  223.     { 0x4c0000, 0x4c0001, input_port_0_r },
  224.     { 0x4c0002, 0x4c0003, video_ofs_r },
  225.     { 0x4c0004, 0x4c0005, toaplan1_videoram1_r },    /* sprites info */
  226.     { 0x4c0006, 0x4c0007, toaplan1_videoram2_r },    /* sprite size ? */
  227.     { -1 }    /* end of table */
  228. };
  229. static struct MemoryWriteAddress zerowing_writemem[] =
  230. {
  231.     { 0x000000, 0x07ffff, MWA_ROM },
  232.     { 0x080000, 0x087fff, MWA_BANK1 },
  233.     { 0x0c0000, 0x0c0003, offsetregs_w },
  234.     { 0x0c0006, 0x0c0007, toaplan1_flipscreen_w },
  235.     { 0x400002, 0x400003, toaplan1_int_enable_w },
  236.     { 0x400008, 0x40000f, layers_offset_w },
  237.     { 0x404000, 0x4047ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  238.     { 0x406000, 0x4067ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  239.     { 0x440000, 0x440fff, toaplan1_shared_w, &toaplan1_sharedram },
  240.     { 0x480002, 0x480003, video_ofs3_w },
  241.     { 0x480004, 0x480007, toaplan1_videoram3_w },    /* tile layers */
  242.     { 0x480010, 0x48001f, scrollregs_w },
  243.     { 0x4c0002, 0x4c0003, video_ofs_w },
  244.     { 0x4c0004, 0x4c0005, toaplan1_videoram1_w },    /* sprites info */
  245.     { 0x4c0006, 0x4c0007, toaplan1_videoram2_w },    /* sprite size ? */
  246.     { -1 }    /* end of table */
  247. };
  248.  
  249. static struct MemoryReadAddress demonwld_readmem[] =
  250. {
  251.     { 0x000000, 0x03ffff, MRA_ROM },
  252.     { 0x400000, 0x400001, input_port_0_r },
  253.     { 0x404000, 0x4047ff, toaplan1_colorram1_r },
  254.     { 0x406000, 0x4067ff, toaplan1_colorram2_r },
  255.     { 0x600000, 0x600fff, toaplan1_shared_r },
  256.     { 0x800002, 0x800003, video_ofs3_r },
  257.     { 0x800004, 0x800007, toaplan1_videoram3_r },    /* tile layers */
  258.     { 0x800010, 0x80001f, scrollregs_r },
  259.     { 0xa00000, 0xa00001, input_port_0_r },
  260.     { 0xa00002, 0xa00003, video_ofs_r },
  261.     { 0xa00004, 0xa00005, toaplan1_videoram1_r },    /* sprites info */
  262.     { 0xa00006, 0xa00007, toaplan1_videoram2_r },    /* sprite size ? */
  263.     { 0xc00000, 0xc03fff, MRA_BANK1},
  264.     { -1 }
  265. };
  266. static struct MemoryWriteAddress demonwld_writemem[] =
  267. {
  268.     { 0x000000, 0x03ffff, MWA_ROM },
  269.     { 0x340006, 0x340007, toaplan1_flipscreen_w },
  270.     { 0x404000, 0x4047ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  271.     { 0x406000, 0x4067ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  272.     { 0x600000, 0x600fff, toaplan1_shared_w, &toaplan1_sharedram },
  273.     { 0x800002, 0x800003, video_ofs3_w },
  274.     { 0x800004, 0x800007, toaplan1_videoram3_w },    /* tile layers */
  275.     { 0x800010, 0x80001f, scrollregs_w },
  276.     { 0x400000, 0x400001, toaplan1_int_enable_w },
  277.     { 0x400008, 0x40000f, layers_offset_w },
  278.     { 0xa00002, 0xa00003, video_ofs_w },
  279.     { 0xa00004, 0xa00005, toaplan1_videoram1_w },    /* sprites info */
  280.     { 0xa00006, 0xa00007, toaplan1_videoram2_w },    /* sprite size ? */
  281.     { 0xc00000, 0xc03fff, MWA_BANK1},
  282.     { 0xe00000, 0xe00003, offsetregs_w },
  283.     { 0xe0000a, 0xe0000b, demonwld_dsp_ctrl_w },            /* DSP Comms control */
  284.     { -1 }
  285. };
  286.  
  287. static struct MemoryReadAddress samesame_readmem[] =
  288. {
  289.     { 0x000000, 0x00ffff, MRA_ROM },
  290.     { 0x040000, 0x07ffff, MRA_ROM },
  291.     { 0x0c0000, 0x0c3fff, MRA_BANK1 },
  292.     { 0x100000, 0x100001, toaplan1_vblank_r },
  293.     { 0x104000, 0x1047ff, toaplan1_colorram1_r },
  294.     { 0x106000, 0x1067ff, toaplan1_colorram2_r },
  295.     { 0x140000, 0x140001, input_port_1_r },
  296.     { 0x140002, 0x140003, input_port_2_r },
  297.     { 0x140004, 0x140005, input_port_3_r },
  298.     { 0x140006, 0x140007, input_port_4_r },
  299.     { 0x140008, 0x140009, input_port_5_r },
  300.     { 0x14000a, 0x14000b, samesame_port_6_r },        /* Territory, and MCU ready */
  301.     { 0x180002, 0x180003, video_ofs3_r },
  302.     { 0x180004, 0x180007, toaplan1_videoram3_r },    /* tile layers */
  303.     { 0x180010, 0x18001f, scrollregs_r },
  304.     { 0x1c0000, 0x1c0001, input_port_0_r },
  305.     { 0x1c0002, 0x1c0003, video_ofs_r },
  306.     { 0x1c0004, 0x1c0005, toaplan1_videoram1_r },    /* sprites info */
  307.     { 0x1c0006, 0x1c0007, toaplan1_videoram2_r },    /* sprite size ? */
  308.     { -1 }    /* end of table */
  309. };
  310. static struct MemoryWriteAddress samesame_writemem[] =
  311. {
  312.     { 0x000000, 0x00ffff, MWA_ROM },
  313.     { 0x040000, 0x07ffff, MWA_ROM },
  314.     { 0x080000, 0x080003, offsetregs_w },
  315.     { 0x080006, 0x080007, toaplan1_flipscreen_w },
  316.     { 0x0c0000, 0x0c3fff, MWA_BANK1 },            /* Frame done at $c1ada */
  317. /*    { 0x100000, 0x100001, ??? },                disable palette refresh ? */
  318.     { 0x100002, 0x100003, toaplan1_int_enable_w },
  319.     { 0x100008, 0x10000f, layers_offset_w },
  320.     { 0x104000, 0x1047ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  321.     { 0x106000, 0x1067ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  322.     { 0x14000c, 0x14000d, toaplan1_coin_w },    /* Coin counter/lockout */
  323. //    { 0x14000e, 0x14000f, samesame_mcu_w },        /* Commands sent to HD647180 */
  324.     { 0x180002, 0x180003, video_ofs3_w },
  325.     { 0x180004, 0x180007, toaplan1_videoram3_w },    /* tile layers */
  326.     { 0x180010, 0x18001f, scrollregs_w },
  327. /*    { 0x1c0000, 0x1c0001, ??? },                disable sprite refresh ? */
  328.     { 0x1c0002, 0x1c0003, video_ofs_w },
  329.     { 0x1c0004, 0x1c0005, toaplan1_videoram1_w },    /* sprites info */
  330.     { 0x1c0006, 0x1c0007, toaplan1_videoram2_w },    /* sprite size ? */
  331.     { -1 }    /* end of table */
  332. };
  333.  
  334. static struct MemoryReadAddress outzone_readmem[] =
  335. {
  336.     { 0x000000, 0x07ffff, MRA_ROM },
  337.     { 0x100000, 0x100001, input_port_0_r },
  338.     { 0x100002, 0x100003, video_ofs_r },
  339.     { 0x100004, 0x100005, toaplan1_videoram1_r },    /* sprites info */
  340.     { 0x100006, 0x100007, toaplan1_videoram2_r },
  341.     { 0x140000, 0x140fff, toaplan1_shared_r },
  342.     { 0x200002, 0x200003, video_ofs3_r },
  343.     { 0x200004, 0x200007, toaplan1_videoram3_r },    /* tile layers */
  344.     { 0x200010, 0x20001f, scrollregs_r },
  345.     { 0x240000, 0x243fff, MRA_BANK1 },
  346.     { 0x300000, 0x300001, toaplan1_vblank_r },
  347.     { 0x304000, 0x3047ff, toaplan1_colorram1_r },
  348.     { 0x306000, 0x3067ff, toaplan1_colorram2_r },
  349.     { -1 }
  350. };
  351. static struct MemoryWriteAddress outzone_writemem[] =
  352. {
  353.     { 0x000000, 0x07ffff, MWA_ROM },
  354.     { 0x100002, 0x100003, video_ofs_w },
  355.     { 0x100004, 0x100005, toaplan1_videoram1_w },    /* sprites info */
  356.     { 0x100006, 0x100007, toaplan1_videoram2_w },
  357.     { 0x140000, 0x140fff, toaplan1_shared_w, &toaplan1_sharedram },
  358.     { 0x200002, 0x200003, video_ofs3_w },
  359.     { 0x200004, 0x200007, toaplan1_videoram3_w },    /* tile layers */
  360.     { 0x200010, 0x20001f, scrollregs_w },
  361.     { 0x240000, 0x243fff, MWA_BANK1 },
  362.     { 0x300000, 0x300001, toaplan1_int_enable_w },
  363.     { 0x300008, 0x30000f, layers_offset_w },
  364.     { 0x304000, 0x3047ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  365.     { 0x306000, 0x3067ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  366.     { 0x340000, 0x340003, offsetregs_w },
  367.     { 0x340006, 0x340007, toaplan1_flipscreen_w },
  368.     { -1 }
  369. };
  370.  
  371. static struct MemoryReadAddress vimana_readmem[] =
  372. {
  373.     { 0x000000, 0x03ffff, MRA_ROM },
  374.     { 0x0c0000, 0x0c0001, input_port_0_r },
  375.     { 0x0c0002, 0x0c0003, video_ofs_r },
  376.     { 0x0c0004, 0x0c0005, toaplan1_videoram1_r },    /* sprites info */
  377.     { 0x0c0006, 0x0c0007, toaplan1_videoram2_r },    /* sprite size ? */
  378.     { 0x400000, 0x400001, toaplan1_vblank_r },
  379.     { 0x404000, 0x4047ff, toaplan1_colorram1_r },
  380.     { 0x406000, 0x4067ff, toaplan1_colorram2_r },
  381.     { 0x440000, 0x440005, vimana_mcu_r },
  382.     { 0x440006, 0x440007, input_port_3_r },
  383.     { 0x440008, 0x440009, vimana_input_port_5_r },
  384.     { 0x44000a, 0x44000b, input_port_1_r },
  385.     { 0x44000c, 0x44000d, input_port_2_r },
  386.     { 0x44000e, 0x44000f, input_port_4_r },
  387.     { 0x440010, 0x440011, input_port_6_r },
  388.     { 0x480000, 0x487fff, MRA_BANK1 },
  389.     { 0x4c0000, 0x4c0001, toaplan1_unk_r },
  390.     { 0x4c0002, 0x4c0003, video_ofs3_r },
  391.     { 0x4c0004, 0x4c0007, toaplan1_videoram3_r },    /* tile layers */
  392.     { 0x4c0010, 0x4c001f, scrollregs_r },
  393.     { -1 }    /* end of table */
  394. };
  395. static struct MemoryWriteAddress vimana_writemem[] =
  396. {
  397.     { 0x000000, 0x03ffff, MWA_ROM },
  398.     { 0x080000, 0x080003, offsetregs_w },
  399.     { 0x080006, 0x080007, toaplan1_flipscreen_w },
  400.     { 0x0c0002, 0x0c0003, video_ofs_w },
  401.     { 0x0c0004, 0x0c0005, toaplan1_videoram1_w },    /* sprites info */
  402.     { 0x0c0006, 0x0c0007, toaplan1_videoram2_w },    /* sprite size ? */
  403.     { 0x400002, 0x400003, toaplan1_int_enable_w },    /* IRQACK? */
  404.     { 0x400008, 0x40000f, layers_offset_w },
  405.     { 0x404000, 0x4047ff, toaplan1_colorram1_w, &toaplan1_colorram1, &colorram1_size },
  406.     { 0x406000, 0x4067ff, toaplan1_colorram2_w, &toaplan1_colorram2, &colorram2_size },
  407.     { 0x440000, 0x440005, vimana_mcu_w },
  408.     { 0x480000, 0x487fff, MWA_BANK1 },
  409.     { 0x4c0002, 0x4c0003, video_ofs3_w },
  410.     { 0x4c0004, 0x4c0007, toaplan1_videoram3_w },    /* tile layers */
  411.     { 0x4c0010, 0x4c001f, scrollregs_w },
  412.     { -1 }    /* end of table */
  413. };
  414.  
  415.  
  416.  
  417. static struct MemoryReadAddress sound_readmem[] =
  418. {
  419.     { 0x0000, 0x7fff, MRA_ROM },
  420.     { 0x8000, 0xffff, MRA_RAM },
  421.     { -1 }    /* end of table */
  422. };
  423. static struct MemoryWriteAddress sound_writemem[] =
  424. {
  425.     { 0x0000, 0x7fff, MWA_ROM },
  426.     { 0x8000, 0xffff, MWA_RAM, &toaplan1_sharedram },
  427.     { -1 }    /* end of table */
  428. };
  429.  
  430.  
  431. static struct IOReadPort truxton_sound_readport[] =
  432. {
  433.     { 0x00, 0x00, input_port_1_r },    /* Player 1 */
  434.     { 0x10, 0x10, input_port_2_r },    /* Player 2 */
  435.     { 0x20, 0x20, input_port_5_r },    /* Coin/Start inputs */
  436.     { 0x40, 0x40, input_port_3_r },    /* DSW1 */
  437.     { 0x50, 0x50, input_port_4_r },    /* DSW2 */
  438.     { 0x60, 0x60, YM3812_status_port_0_r },
  439.     { 0x70, 0x70, input_port_6_r },    /* Territory Jumper Block for Truxton */
  440.     { -1 }    /* end of table */
  441. };
  442. static struct IOWritePort truxton_sound_writeport[] =
  443. {
  444.     { 0x30, 0x30, toaplan1_coin_w },    /* Coin counter/lockout */
  445.     { 0x60, 0x60, YM3812_control_port_0_w },
  446.     { 0x61, 0x61, YM3812_write_port_0_w },
  447.     { -1 }    /* end of table */
  448. };
  449. static struct IOWritePort rallybik_sound_writeport[] =
  450. {
  451.     { 0x30, 0x30, rallybik_coin_w },    /* Coin counter/lockout */
  452.     { 0x60, 0x60, YM3812_control_port_0_w },
  453.     { 0x61, 0x61, YM3812_write_port_0_w },
  454.     { -1 }    /* end of table */
  455. };
  456.  
  457. static struct IOReadPort hellfire_sound_readport[] =
  458. {
  459.     { 0x00, 0x00, input_port_3_r },    /* DSW1 */
  460.     { 0x10, 0x10, input_port_4_r },    /* DSW2 */
  461.     { 0x20, 0x20, input_port_6_r },    /* Territory Jumper Block */
  462.     { 0x40, 0x40, input_port_1_r },    /* Player 1 */
  463.     { 0x50, 0x50, input_port_2_r },    /* Player 2 */
  464.     { 0x60, 0x60, input_port_5_r },    /* Coin/Start inputs */
  465.     { 0x70, 0x70, YM3812_status_port_0_r },
  466.     { -1 }    /* end of table */
  467. };
  468. static struct IOWritePort hellfire_sound_writeport[] =
  469. {
  470.     { 0x30, 0x30, toaplan1_coin_w },    /* Coin counter/lockout */
  471.     { 0x70, 0x70, YM3812_control_port_0_w },
  472.     { 0x71, 0x71, YM3812_write_port_0_w },
  473.     { -1 }    /* end of table */
  474. };
  475.  
  476. static struct IOReadPort zerowing_sound_readport[] =
  477. {
  478.     { 0x00, 0x00, input_port_1_r },    /* Player 1 */
  479.     { 0x08, 0x08, input_port_2_r },    /* Player 2 */
  480.     { 0x20, 0x20, input_port_3_r },    /* DSW1 */
  481.     { 0x28, 0x28, input_port_4_r },    /* DSW2 */
  482.     { 0x80, 0x80, input_port_5_r },    /* Coin/Start inputs */
  483.     { 0x88, 0x88, input_port_6_r },    /* Territory Jumper Block */
  484.     { 0xa8, 0xa8, YM3812_status_port_0_r },
  485.     { -1 }    /* end of table */
  486. };
  487. static struct IOWritePort zerowing_sound_writeport[] =
  488. {
  489.     { 0xa0, 0xa0, toaplan1_coin_w },    /* Coin counter/lockout */
  490.     { 0xa8, 0xa8, YM3812_control_port_0_w },
  491.     { 0xa9, 0xa9, YM3812_write_port_0_w },
  492.     { -1 }    /* end of table */
  493. };
  494.  
  495. static struct IOReadPort demonwld_sound_readport[] =
  496. {
  497.     { 0x00, 0x00, YM3812_status_port_0_r },
  498.     { 0x20, 0x20, input_port_6_r },
  499.     { 0x60, 0x60, input_port_5_r },
  500.     { 0x80, 0x80, input_port_1_r },
  501.     { 0xa0, 0xa0, input_port_4_r },
  502.     { 0xc0, 0xc0, input_port_2_r },
  503.     { 0xe0, 0xe0, input_port_3_r },
  504.     { -1 }    /* end of table */
  505. };
  506. static struct IOWritePort demonwld_sound_writeport[] =
  507. {
  508.     { 0x00, 0x00, YM3812_control_port_0_w },
  509.     { 0x01, 0x01, YM3812_write_port_0_w },
  510.     { 0x40, 0x40, toaplan1_coin_w },    /* Coin counter/lockout */
  511.     { -1 }    /* end of table */
  512. };
  513.  
  514. static struct IOReadPort outzone_sound_readport[] =
  515. {
  516.     { 0x08, 0x08, input_port_3_r },
  517.     { 0x0c, 0x0c, input_port_4_r },
  518.     { 0x10, 0x10, input_port_5_r },
  519.     { 0x14, 0x14, input_port_1_r },
  520.     { 0x18, 0x18, input_port_2_r },
  521.     { 0x1c, 0x1c, input_port_6_r },
  522.     { 0x00, 0x00, YM3812_status_port_0_r },
  523.     { -1 }    /* end of table */
  524. };
  525. static struct IOWritePort outzone_sound_writeport[] =
  526. {
  527.     { 0x00, 0x00, YM3812_control_port_0_w },
  528.     { 0x01, 0x01, YM3812_write_port_0_w },
  529.     { 0x04, 0x04, toaplan1_coin_w },    /* Coin counter/lockout */
  530.     { -1 }    /* end of table */
  531. };
  532.  
  533. static struct MemoryReadAddress DSP_readmem[] =
  534. {
  535.     { 0x0000, 0x0fff, MRA_ROM },    /* 0x800 words */
  536.     { 0x8000, 0x811f, MRA_RAM },    /* The real DSP has this at address 0 */
  537.                                     /* View this at 4000h in the debugger */
  538.     { -1 }    /* end of table */
  539. };
  540.  
  541. static struct MemoryWriteAddress DSP_writemem[] =
  542. {
  543.     { 0x0000, 0x0fff, MWA_ROM },    /* 0x800 words */
  544.     { 0x8000, 0x811f, MWA_RAM },    /* The real DSP has this at address 0 */
  545.                                     /* View this at 4000h in the debugger */
  546.     { -1 }    /* end of table */
  547. };
  548.  
  549. static struct IOReadPort DSP_readport[] =
  550. {
  551.     { 0x01, 0x01, demonwld_dsp_r },
  552.     { -1 }    /* end of table */
  553. };
  554.  
  555. static struct IOWritePort DSP_writeport[] =
  556. {
  557.     { 0x00, 0x03, demonwld_dsp_w },
  558.     { -1 }    /* end of table */
  559. };
  560.  
  561.  
  562. /*****************************************************************************
  563.     Input Port definitions
  564. *****************************************************************************/
  565.  
  566.  
  567. #define  TOAPLAN1_PLAYER_INPUT( player, button3 )                                        \
  568.     PORT_START                                                                    \
  569.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | player )    \
  570.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | player )    \
  571.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | player )    \
  572.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | player )    \
  573.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | player )                        \
  574.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | player )                        \
  575.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, button3 | player )                                    \
  576.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  577.  
  578. #define  TOAPLAN1_SYSTEM_INPUTS                        \
  579.     PORT_START                                        \
  580.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )     \
  581.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )        \
  582.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )    \
  583.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )        \
  584.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )        \
  585.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )    \
  586.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )    \
  587.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  588.  
  589.  
  590.  
  591. INPUT_PORTS_START( rallybik )
  592.     PORT_START        /* VBlank */
  593.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  594.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  595.  
  596.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  597.  
  598.     TOAPLAN1_PLAYER_INPUT( IPF_COCKTAIL, IPT_UNKNOWN )
  599.  
  600.     PORT_START        /* DSW A */
  601.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  602.     PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  603.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  604.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  605.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  606.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  607.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  608.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  609.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  610.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  611.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  612.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  613.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  614.     PORT_DIPSETTING(    0x30, DEF_STR( 2C_3C ) )
  615.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  616.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  617.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  618.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  619.     PORT_DIPSETTING(    0xc0, DEF_STR( 2C_3C ) )
  620.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
  621.  
  622.     PORT_START        /* DSW B */
  623.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  624.     PORT_DIPSETTING(    0x01, "Easy" )
  625.     PORT_DIPSETTING(    0x00, "Medium" )
  626.     PORT_DIPSETTING(    0x02, "Hard" )
  627.     PORT_DIPSETTING(    0x03, "Hardest" )
  628.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
  629.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  630.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  631.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  632.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  633.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  634.     PORT_DIPNAME( 0x30, 0x20, "Territory/Copyright" )
  635.     PORT_DIPSETTING(    0x20, "World/Taito Corp Japan" )
  636.     PORT_DIPSETTING(    0x10, "USA/Taito America" )
  637.     PORT_DIPSETTING(    0x00, "Japan/Taito Corp" )
  638.     PORT_DIPSETTING(    0x30, "USA/Taito America (Romstar)" )
  639.     PORT_DIPNAME( 0x40, 0x00, "Dip Switch Display" )
  640.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  641.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  642.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  643.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  644.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  645.  
  646.     TOAPLAN1_SYSTEM_INPUTS
  647.  
  648. INPUT_PORTS_END
  649.  
  650. INPUT_PORTS_START( truxton )
  651.     PORT_START        /* VBlank */
  652.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  653.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  654.  
  655.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  656.  
  657.     TOAPLAN1_PLAYER_INPUT( IPF_COCKTAIL, IPT_UNKNOWN )
  658.  
  659.     PORT_START        /* DSW A */
  660.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  661.     PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  662.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  663.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  664.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  665.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  666.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  667.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  668.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  669.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  670. /* credits per coin options change, depending on the territory setting */
  671.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  672.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  673.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  674.     PORT_DIPSETTING(    0x30, DEF_STR( 2C_3C ) )
  675.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  676.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  677.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  678.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  679.     PORT_DIPSETTING(    0xc0, DEF_STR( 2C_3C ) )
  680.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
  681. /* The following are coin settings for Japan
  682.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  683.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  684.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  685.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  686.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  687.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  688.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  689.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  690.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  691.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  692. */
  693.  
  694.     PORT_START        /* DSW B */
  695.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  696.     PORT_DIPSETTING(    0x01, "Easy" )
  697.     PORT_DIPSETTING(    0x00, "Medium" )
  698.     PORT_DIPSETTING(    0x02, "Hard" )
  699.     PORT_DIPSETTING(    0x03, "Hardest" )
  700.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  701.     PORT_DIPSETTING(    0x04, "50K, every 150K" )
  702.     PORT_DIPSETTING(    0x00, "70K, every 200K" )
  703.     PORT_DIPSETTING(    0x08, "100K only" )
  704.     PORT_DIPSETTING(    0x0c, "None" )
  705.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  706.     PORT_DIPSETTING(    0x30, "2" )
  707.     PORT_DIPSETTING(    0x00, "3" )
  708.     PORT_DIPSETTING(    0x20, "4" )
  709.     PORT_DIPSETTING(    0x10, "5" )
  710.     PORT_DIPNAME( 0x40, 0x00, "Show Dip Switches" )
  711.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  712.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  713.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  714.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  715.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  716.  
  717.     TOAPLAN1_SYSTEM_INPUTS
  718.  
  719.     PORT_START        /* Territory Jumper Block */
  720.     PORT_DIPNAME( 0x07, 0x02, "Territory/Copyright" )
  721.     PORT_DIPSETTING(    0x02, "World/Taito Corp" )
  722.     PORT_DIPSETTING(    0x06, "World/Taito America" )
  723.     PORT_DIPSETTING(    0x04, "US/Taito America" )
  724.     PORT_DIPSETTING(    0x01, "US/Romstar" )
  725.     PORT_DIPSETTING(    0x00, "Japan/Taito Corp" )
  726. //    PORT_DIPSETTING(    0x05, "Same as 0x04" )
  727. //    PORT_DIPSETTING(    0x03, "Same as 0x02" )
  728. //    PORT_DIPSETTING(    0x07, "Same as 0x06" )
  729.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) )
  730.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  731.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  732.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  733. INPUT_PORTS_END
  734.  
  735. INPUT_PORTS_START( hellfire )
  736.     PORT_START        /* VBlank */
  737.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  738.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  739.  
  740.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  741.  
  742.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_UNKNOWN )
  743.  
  744.     PORT_START        /* DSW A */
  745.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  746.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  747.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  748.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  749.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  750.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  751.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  752.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  753.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  754.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  755.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  756.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  757.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  758.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  759.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  760.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  761.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  762.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  763.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  764.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  765.  
  766.     PORT_START        /* DSWB */
  767.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  768.     PORT_DIPSETTING(    0x01, "Easy" )
  769.     PORT_DIPSETTING(    0x00, "Medium" )
  770.     PORT_DIPSETTING(    0x02, "Hard" )
  771.     PORT_DIPSETTING(    0x03, "Hardest" )
  772.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  773.     PORT_DIPSETTING(    0x00, "70K, every 200K" )
  774.     PORT_DIPSETTING(    0x04, "100K, every 250K" )
  775.     PORT_DIPSETTING(    0x08, "100K" )
  776.     PORT_DIPSETTING(    0x0c, "200K" )
  777.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  778.     PORT_DIPSETTING(    0x30, "2" )
  779.     PORT_DIPSETTING(    0x00, "3" )
  780.     PORT_DIPSETTING(    0x20, "4" )
  781.     PORT_DIPSETTING(    0x10, "5" )
  782.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  783.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  784.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  785.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
  786.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  787.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  788.  
  789.     TOAPLAN1_SYSTEM_INPUTS
  790.  
  791.     PORT_START        /* Territory Jumper block */
  792.     PORT_DIPNAME( 0x03, 0x02, "Territory" )
  793.     PORT_DIPSETTING(    0x02, "Europe" )
  794. //    PORT_DIPSETTING(    0x03, "Europe" )
  795.     PORT_DIPSETTING(    0x01, "US" )
  796.     PORT_DIPSETTING(    0x00, "Japan" )
  797.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) )
  798.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  799.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  800.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) )
  801.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  802.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  803.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  804. INPUT_PORTS_END
  805.  
  806. INPUT_PORTS_START( zerowing )
  807.     PORT_START        /* VBlank */
  808.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  809.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  810.  
  811.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  812.  
  813.     TOAPLAN1_PLAYER_INPUT( IPF_COCKTAIL, IPT_UNKNOWN )
  814.  
  815.     PORT_START        /* DSW A */
  816.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  817.     PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  818.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  819.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  820.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  821.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  822.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  823.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  824.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  825.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  826.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  827.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  828.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  829.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  830.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  831.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  832.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  833.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  834.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  835.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  836.  
  837.     PORT_START        /* DSW B */
  838.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  839.     PORT_DIPSETTING(    0x01, "Easy" )
  840.     PORT_DIPSETTING(    0x00, "Medium" )
  841.     PORT_DIPSETTING(    0x02, "Hard" )
  842.     PORT_DIPSETTING(    0x03, "Hardest" )
  843.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  844.     PORT_DIPSETTING(    0x00, "200K, every 500K" )
  845.     PORT_DIPSETTING(    0x04, "500K, every 1M" )
  846.     PORT_DIPSETTING(    0x08, "500K" )
  847.     PORT_DIPSETTING(    0x0c, "None" )
  848.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  849.     PORT_DIPSETTING(    0x30, "2" )
  850.     PORT_DIPSETTING(    0x00, "3" )
  851.     PORT_DIPSETTING(    0x20, "4" )
  852.     PORT_DIPSETTING(    0x10, "5" )
  853.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  854.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  855.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  856.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  857.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  858.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  859.  
  860.     TOAPLAN1_SYSTEM_INPUTS
  861.  
  862.     PORT_START        /* Territory Jumper block */
  863.     PORT_DIPNAME( 0x03, 0x02, "Territory" )
  864.     PORT_DIPSETTING(    0x02, "Europe" )
  865. //    PORT_DIPSETTING(    0x03, "Europe" )
  866.     PORT_DIPSETTING(    0x01, "US" )
  867.     PORT_DIPSETTING(    0x00, "Japan" )
  868.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) )
  869.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  870.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  871.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) )
  872.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  873.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  874.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  875. INPUT_PORTS_END
  876.  
  877. INPUT_PORTS_START( demonwld )
  878.     PORT_START        /* VBlank */
  879.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  880.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  881.  
  882.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_BUTTON3 )
  883.  
  884.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_BUTTON3 )
  885.  
  886.     PORT_START        /* DSW A */
  887.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  888.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  889.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  890.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  891.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  892.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  893.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  894.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  895.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  896.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  897.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  898.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  899.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  900.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  901.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  902.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  903.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  904.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  905.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  906.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  907.  
  908.     PORT_START        /* DSW B */
  909.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  910.     PORT_DIPSETTING(    0x01, "Easy" )
  911.     PORT_DIPSETTING(    0x00, "Medium" )
  912.     PORT_DIPSETTING(    0x02, "Hard" )
  913.     PORT_DIPSETTING(    0x03, "Hardest" )
  914.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  915.     PORT_DIPSETTING(    0x00, "30K, every 100K" )
  916.     PORT_DIPSETTING(    0x04, "50K and 100K" )
  917.     PORT_DIPSETTING(    0x08, "100K only" )
  918.     PORT_DIPSETTING(    0x0c, "None" )
  919.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  920.     PORT_DIPSETTING(    0x30, "1" )
  921.     PORT_DIPSETTING(    0x20, "2" )
  922.     PORT_DIPSETTING(    0x00, "3" )
  923.     PORT_DIPSETTING(    0x10, "5" )
  924.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  925.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  926.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  927.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
  928.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  929.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  930.  
  931.     TOAPLAN1_SYSTEM_INPUTS
  932.  
  933.     PORT_START        /* Territory Jumper Block */
  934.     PORT_DIPNAME( 0x03, 0x02, "Territory/Copyright" )
  935.     PORT_DIPSETTING(    0x02, "World/Taito Japan" )
  936.     PORT_DIPSETTING(    0x03, "US/Toaplan" )
  937.     PORT_DIPSETTING(    0x01, "US/Taito America" )
  938.     PORT_DIPSETTING(    0x00, "Japan/Taito Corp" )
  939.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
  940.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  941.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  942.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  943.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  944.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  945.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  946. INPUT_PORTS_END
  947.  
  948. INPUT_PORTS_START( samesame )
  949.     PORT_START        /* VBlank */
  950.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  951.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  952.  
  953.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  954.  
  955.     TOAPLAN1_PLAYER_INPUT( IPF_COCKTAIL, IPT_UNKNOWN )
  956.  
  957.     PORT_START        /* DSW A */
  958.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  959.     PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  960.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  961.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  962.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  963.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  964.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  965.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  966.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  967.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  968.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  969.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  970.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  971.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
  972.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  973.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  974.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  975.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  976.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  977.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
  978.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  979.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  980. /* settings listed in service mode, but not actually used ???
  981.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  982.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  983.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  984.     PORT_DIPSETTING(    0x30, DEF_STR( 2C_3C ) )
  985.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  986.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  987.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  988.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  989.     PORT_DIPSETTING(    0xc0, DEF_STR( 2C_3C ) )
  990.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
  991. */
  992.  
  993.     PORT_START        /* DSW B */
  994.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  995.     PORT_DIPSETTING(    0x01, "Easy" )
  996.     PORT_DIPSETTING(    0x00, "Medium" )
  997.     PORT_DIPSETTING(    0x02, "Hard" )
  998.     PORT_DIPSETTING(    0x03, "Hardest" )
  999.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  1000.     PORT_DIPSETTING(    0x04, "50K, every 150K" )
  1001.     PORT_DIPSETTING(    0x00, "70K, every 200K" )
  1002.     PORT_DIPSETTING(    0x08, "100K" )
  1003.     PORT_DIPSETTING(    0x0c, "None" )
  1004.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  1005.     PORT_DIPSETTING(    0x30, "2" )
  1006.     PORT_DIPSETTING(    0x00, "3" )
  1007.     PORT_DIPSETTING(    0x20, "4" )
  1008.     PORT_DIPSETTING(    0x10, "5" )
  1009.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  1010.     PORT_DIPSETTING(    0x00, "Normal" )
  1011.     PORT_DIPSETTING(    0x40, "Unknown" )
  1012.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  1013.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  1014.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  1015.  
  1016.     TOAPLAN1_SYSTEM_INPUTS
  1017.  
  1018.     PORT_START        /* Territory Jumper Block */
  1019.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
  1020.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1021.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1022.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
  1023.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1024.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1025.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
  1026.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1027.     PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  1028.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  1029.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1030.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  1031.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1032. INPUT_PORTS_END
  1033.  
  1034. INPUT_PORTS_START( fireshrk )
  1035.     PORT_START        /* VBlank */
  1036.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  1037.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1038.  
  1039.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_UNKNOWN )
  1040.  
  1041.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_UNKNOWN )
  1042.  
  1043.     PORT_START        /* DSW A */
  1044.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  1045.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1046.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1047.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  1048.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1049.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1050.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  1051.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  1052.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1053.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1054.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  1055.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  1056.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  1057.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  1058.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1059.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  1060.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  1061.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  1062.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1063.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  1064.  
  1065.     PORT_START        /* DSW B */
  1066.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  1067.     PORT_DIPSETTING(    0x01, "Easy" )
  1068.     PORT_DIPSETTING(    0x00, "Medium" )
  1069.     PORT_DIPSETTING(    0x02, "Hard" )
  1070.     PORT_DIPSETTING(    0x03, "Hardest" )
  1071.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  1072.     PORT_DIPSETTING(    0x04, "50K, every 150K" )
  1073.     PORT_DIPSETTING(    0x00, "70K, every 200K" )
  1074.     PORT_DIPSETTING(    0x08, "100K" )
  1075.     PORT_DIPSETTING(    0x0c, "None" )
  1076.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  1077.     PORT_DIPSETTING(    0x30, "2" )
  1078.     PORT_DIPSETTING(    0x00, "3" )
  1079.     PORT_DIPSETTING(    0x20, "4" )
  1080.     PORT_DIPSETTING(    0x10, "5" )
  1081.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  1082.     PORT_DIPSETTING(    0x00, "Normal" )
  1083.     PORT_DIPSETTING(    0x40, "Unknown" )
  1084.     PORT_DIPNAME( 0x80,    0x00, DEF_STR( Unused ) )
  1085.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1086.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1087.  
  1088.     TOAPLAN1_SYSTEM_INPUTS
  1089.  
  1090.     PORT_START        /* Territory Jumper Block */
  1091.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
  1092.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1093.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1094.     PORT_DIPNAME( 0x06, 0x02, "Territory" )
  1095.     PORT_DIPSETTING(    0x02, "Europe" )
  1096.     PORT_DIPSETTING(    0x04, "USA" )
  1097.     PORT_DIPSETTING(    0x00, "USA (Romstar)" )
  1098.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  1099.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1100.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  1101.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1102. INPUT_PORTS_END
  1103.  
  1104. INPUT_PORTS_START( outzone )
  1105.     PORT_START        /* VBlank */
  1106.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  1107.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1108.  
  1109.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_BUTTON3 )
  1110.  
  1111.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_BUTTON3 )
  1112.  
  1113.     PORT_START        /* DSW A */
  1114.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  1115.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1116.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1117.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  1118.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1119.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1120.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  1121.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  1122.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1123.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1124.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  1125.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  1126.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  1127.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  1128.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1129.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  1130.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  1131.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  1132.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1133.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  1134.  
  1135.     PORT_START        /* DSW B */
  1136.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  1137.     PORT_DIPSETTING(    0x01, "Easy" )
  1138.     PORT_DIPSETTING(    0x00, "Medium" )
  1139.     PORT_DIPSETTING(    0x02, "Hard" )
  1140.     PORT_DIPSETTING(    0x03, "Hardest" )
  1141.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  1142.     PORT_DIPSETTING(    0x00, "Every 300K" )
  1143.     PORT_DIPSETTING(    0x04, "200K and 500K" )
  1144.     PORT_DIPSETTING(    0x08, "300K only" )
  1145.     PORT_DIPSETTING(    0x0c, "None" )
  1146.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  1147.     PORT_DIPSETTING(    0x30, "1" )
  1148.     PORT_DIPSETTING(    0x20, "2" )
  1149.     PORT_DIPSETTING(    0x00, "3" )
  1150.     PORT_DIPSETTING(    0x10, "5" )
  1151.     PORT_BITX( 0x40,    0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", 0 ,0 )
  1152.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1153.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1154.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
  1155.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1156.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1157.  
  1158.     TOAPLAN1_SYSTEM_INPUTS
  1159.  
  1160.     PORT_START        /* Territory Jumper Block */
  1161.     PORT_DIPNAME( 0x07, 0x02, "Territory" )
  1162.     PORT_DIPSETTING(    0x02, "Europe" )
  1163.     PORT_DIPSETTING(    0x01, "US" )
  1164.     PORT_DIPSETTING(    0x00, "Japan" )
  1165.     PORT_DIPSETTING(    0x03, "Hong Kong" )
  1166.     PORT_DIPSETTING(    0x04, "Korea" )
  1167.     PORT_DIPSETTING(    0x05, "Taiwan" )
  1168.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  1169.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1170.     PORT_DIPSETTING(    0x08, DEF_STR( On ) )
  1171.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1172. INPUT_PORTS_END
  1173.  
  1174. INPUT_PORTS_START( vimana )
  1175.     PORT_START        /* VBlank */
  1176.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  1177.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1178.  
  1179.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_BUTTON3 )
  1180.  
  1181.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_BUTTON3 )
  1182.  
  1183.     PORT_START        /* DSW A */
  1184.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  1185.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1186.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1187.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  1188.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1189.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1190.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  1191.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  1192.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1193.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1194.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  1195.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  1196.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  1197.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  1198.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1199.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  1200.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  1201.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  1202.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1203.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  1204.  
  1205.     PORT_START        /* DSW B */
  1206.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  1207.     PORT_DIPSETTING(    0x01, "Easy" )
  1208.     PORT_DIPSETTING(    0x00, "Medium" )
  1209.     PORT_DIPSETTING(    0x02, "Hard" )
  1210.     PORT_DIPSETTING(    0x03, "Hardest" )
  1211.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  1212.     PORT_DIPSETTING(    0x00, "70K and 200K" )
  1213.     PORT_DIPSETTING(    0x04, "100K and 250K" )
  1214.     PORT_DIPSETTING(    0x08, "100K" )
  1215.     PORT_DIPSETTING(    0x0c, "200K" )
  1216.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  1217.     PORT_DIPSETTING(    0x30, "2" )
  1218.     PORT_DIPSETTING(    0x00, "3" )
  1219.     PORT_DIPSETTING(    0x20, "4" )
  1220.     PORT_DIPSETTING(    0x10, "5" )
  1221.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  1222.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1223.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1224.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  1225.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  1226.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  1227.  
  1228.     TOAPLAN1_SYSTEM_INPUTS
  1229.  
  1230.     PORT_START        /* Territory Jumper Block */
  1231.     PORT_DIPNAME( 0x0f, 0x02, "Territory" )
  1232.     PORT_DIPSETTING(    0x02, "Europe" )
  1233.     PORT_DIPSETTING(    0x01, "US" )
  1234.     PORT_DIPSETTING(    0x00, "Japan" )
  1235.     PORT_DIPSETTING(    0x03, "Hong Kong" )
  1236.     PORT_DIPSETTING(    0x04, "Korea" )
  1237.     PORT_DIPSETTING(    0x05, "Taiwan" )
  1238. //    PORT_DIPSETTING(    0x06, "Taiwan" )
  1239. //    PORT_DIPSETTING(    0x07, "US" )
  1240. //    PORT_DIPSETTING(    0x08, "Hong Kong" )
  1241. //    PORT_DIPSETTING(    0x09, DEF_STR( Unused ) )
  1242. //    PORT_DIPSETTING(    0x0a, DEF_STR( Unused ) )
  1243. //    PORT_DIPSETTING(    0x0b, DEF_STR( Unused ) )
  1244. //    PORT_DIPSETTING(    0x0c, DEF_STR( Unused ) )
  1245. //    PORT_DIPSETTING(    0x0d, DEF_STR( Unused ) )
  1246. //    PORT_DIPSETTING(    0x0e, DEF_STR( Unused ) )
  1247. //    PORT_DIPSETTING(    0x0f, "Japan" )
  1248.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1249. INPUT_PORTS_END
  1250.  
  1251. INPUT_PORTS_START( vimanan )
  1252.     PORT_START        /* VBlank */
  1253.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
  1254.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1255.  
  1256.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER1, IPT_BUTTON3 )
  1257.  
  1258.     TOAPLAN1_PLAYER_INPUT( IPF_PLAYER2, IPT_BUTTON3 )
  1259.  
  1260.     PORT_START        /* DSW A */
  1261.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unused ) )
  1262.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1263.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  1264.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
  1265.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1266.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  1267.     PORT_SERVICE( 0x04, IP_ACTIVE_HIGH )
  1268.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
  1269.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1270.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1271.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unused ) )
  1272.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1273.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  1274.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) )
  1275.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1276.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  1277.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) )
  1278.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1279.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1280.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
  1281.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1282.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  1283. /* settings for other territories (non Nova license)
  1284.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
  1285.     PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
  1286.     PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  1287.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  1288.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  1289.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
  1290.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
  1291.     PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
  1292.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1293.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
  1294. */
  1295.  
  1296.     PORT_START        /* DSW B */
  1297.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
  1298.     PORT_DIPSETTING(    0x01, "Easy" )
  1299.     PORT_DIPSETTING(    0x00, "Medium" )
  1300.     PORT_DIPSETTING(    0x02, "Hard" )
  1301.     PORT_DIPSETTING(    0x03, "Hardest" )
  1302.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  1303.     PORT_DIPSETTING(    0x00, "70K and 200K" )
  1304.     PORT_DIPSETTING(    0x04, "100K and 250K" )
  1305.     PORT_DIPSETTING(    0x08, "100K" )
  1306.     PORT_DIPSETTING(    0x0c, "200K" )
  1307.     PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
  1308.     PORT_DIPSETTING(    0x30, "2" )
  1309.     PORT_DIPSETTING(    0x00, "3" )
  1310.     PORT_DIPSETTING(    0x20, "4" )
  1311.     PORT_DIPSETTING(    0x10, "5" )
  1312.     PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  1313.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1314.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1315.     PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
  1316.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  1317.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  1318.  
  1319.     TOAPLAN1_SYSTEM_INPUTS
  1320.  
  1321.     PORT_START        /* Territory Jumper Block */
  1322.     PORT_DIPNAME( 0x0f, 0x02, "Territory" )
  1323.     PORT_DIPSETTING(    0x02, "Europe" )
  1324.     PORT_DIPSETTING(    0x01, "US" )
  1325.     PORT_DIPSETTING(    0x00, "Japan" )
  1326.     PORT_DIPSETTING(    0x03, "Hong Kong" )
  1327.     PORT_DIPSETTING(    0x04, "Korea" )
  1328.     PORT_DIPSETTING(    0x05, "Taiwan" )
  1329. //    PORT_DIPSETTING(    0x06, "Taiwan" )
  1330. //    PORT_DIPSETTING(    0x07, "US" )
  1331. //    PORT_DIPSETTING(    0x08, "Hong Kong" )
  1332. //    PORT_DIPSETTING(    0x09, DEF_STR( Unused ) )
  1333. //    PORT_DIPSETTING(    0x0a, DEF_STR( Unused ) )
  1334. //    PORT_DIPSETTING(    0x0b, DEF_STR( Unused ) )
  1335. //    PORT_DIPSETTING(    0x0c, DEF_STR( Unused ) )
  1336. //    PORT_DIPSETTING(    0x0d, DEF_STR( Unused ) )
  1337. //    PORT_DIPSETTING(    0x0e, DEF_STR( Unused ) )
  1338. //    PORT_DIPSETTING(    0x0f, "Japan" )
  1339.     PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1340. INPUT_PORTS_END
  1341.  
  1342.  
  1343. static struct GfxLayout tilelayout =
  1344. {
  1345.     8,8,    /* 8x8 */
  1346.     16384,    /* 16384 tiles */
  1347.     4,        /* 4 bits per pixel */
  1348.     { 3*8*0x20000, 2*8*0x20000, 1*8*0x20000, 0*8*0x20000 },
  1349.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  1350.     { 0, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38 },
  1351.     64
  1352. };
  1353.  
  1354. static struct GfxLayout rallybik_spr_layout =
  1355. {
  1356.     16,16,    /* 16*16 sprites */
  1357.     2048,    /* 2048 sprites */
  1358.     4,        /* 4 bits per pixel */
  1359.     { 0*2048*32*8, 1*2048*32*8, 2*2048*32*8, 3*2048*32*8 },
  1360.     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
  1361.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  1362.             8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
  1363.     32*8    /* every sprite takes 32 consecutive bytes */
  1364. };
  1365.  
  1366. static struct GfxLayout vm_tilelayout =
  1367. {
  1368.     8,8,    /* 8x8 */
  1369.     32768,    /* 32768 tiles */
  1370.     4,        /* 4 bits per pixel */
  1371.     { 8*0x80000+8, 8*0x80000, 8, 0 },
  1372.     { 0, 1, 2, 3, 4, 5, 6, 7 },
  1373.     { 0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70 },
  1374.     128
  1375. };
  1376.  
  1377.  
  1378. static struct GfxDecodeInfo gfxdecodeinfo[] =
  1379. {
  1380.     { REGION_GFX1, 0x00000, &tilelayout,        0, 64 },
  1381.     { REGION_GFX2, 0x00000, &tilelayout,    64*16, 64 },
  1382.     { -1 } /* end of array */
  1383. };
  1384.  
  1385. static struct GfxDecodeInfo rallybik_gfxdecodeinfo[] =
  1386. {
  1387.     { REGION_GFX1, 0x00000, &tilelayout,              0, 64 },
  1388.     { REGION_GFX2, 0x00000, &rallybik_spr_layout, 64*16, 64 },
  1389.     { -1 } /* end of array */
  1390. };
  1391.  
  1392. static struct GfxDecodeInfo outzone_gfxdecodeinfo[] =
  1393. {
  1394.     { REGION_GFX1, 0x00000, &vm_tilelayout,     0, 64 },
  1395.     { REGION_GFX2, 0x00000, &tilelayout,    64*16, 64 },
  1396.     { -1 } /* end of array */
  1397. };
  1398.  
  1399. static struct GfxDecodeInfo vm_gfxdecodeinfo[] =
  1400. {
  1401.     { REGION_GFX1, 0x00000, &tilelayout,        0, 64 },
  1402.     { REGION_GFX2, 0x00000, &vm_tilelayout, 64*16, 64 },
  1403.     { -1 } /* end of array */
  1404. };
  1405.  
  1406.  
  1407. static void irqhandler(int linestate)
  1408. {
  1409.     cpu_set_irq_line(1,0,linestate);
  1410. }
  1411.  
  1412. static struct YM3812interface ym3812_interface =
  1413. {
  1414.     1,
  1415.     28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1416.     { 255 },
  1417.     { irqhandler },
  1418. };
  1419.  
  1420.  
  1421.  
  1422. static struct MachineDriver machine_driver_rallybik =
  1423. {
  1424.     /* basic machine hardware */
  1425.     {
  1426.         {
  1427.             CPU_M68000,
  1428.             10000000,
  1429.             rallybik_readmem,rallybik_writemem,0,0,
  1430.             toaplan1_interrupt,1
  1431.         },
  1432.         {
  1433.             CPU_Z80,
  1434.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1435.             sound_readmem,sound_writemem,truxton_sound_readport,rallybik_sound_writeport,
  1436.             ignore_interrupt,0
  1437.         }
  1438.     },
  1439.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1440.     10,
  1441.     toaplan1_init_machine,
  1442.  
  1443.     /* video hardware */
  1444.     320, 240, { 0, 319, 0, 239 },
  1445.     rallybik_gfxdecodeinfo,
  1446.     64*16+64*16, 64*16+64*16,
  1447.     0,
  1448.  
  1449.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_BUFFERS_SPRITERAM,
  1450.     rallybik_eof_callback,
  1451.     rallybik_vh_start,
  1452.     rallybik_vh_stop,
  1453.     rallybik_vh_screenrefresh,
  1454.  
  1455.     /* sound hardware */
  1456.     0,0,0,0,
  1457.     {
  1458.         {
  1459.             SOUND_YM3812,
  1460.             &ym3812_interface
  1461.         },
  1462.     }
  1463. };
  1464.  
  1465. static struct MachineDriver machine_driver_truxton =
  1466. {
  1467.     /* basic machine hardware */
  1468.     {
  1469.         {
  1470.             CPU_M68000,
  1471.             10000000,
  1472.             truxton_readmem,truxton_writemem,0,0,
  1473.             toaplan1_interrupt,1
  1474.         },
  1475.         {
  1476.             CPU_Z80,
  1477.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1478.             sound_readmem,sound_writemem,truxton_sound_readport,truxton_sound_writeport,
  1479.             ignore_interrupt,0
  1480.         }
  1481.     },
  1482.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1483.     10,
  1484.     toaplan1_init_machine,
  1485.  
  1486.     /* video hardware */
  1487.     320, 240, { 0, 319, 0, 239 },
  1488.     gfxdecodeinfo,
  1489.     64*16+64*16, 64*16+64*16,
  1490.     0,
  1491.  
  1492.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1493.     toaplan1_eof_callback,
  1494.     toaplan1_vh_start,
  1495.     toaplan1_vh_stop,
  1496.     toaplan1_vh_screenrefresh,
  1497.  
  1498.     /* sound hardware */
  1499.     0,0,0,0,
  1500.     {
  1501.         {
  1502.             SOUND_YM3812,
  1503.             &ym3812_interface
  1504.         },
  1505.     }
  1506. };
  1507.  
  1508. static struct MachineDriver machine_driver_hellfire =
  1509. {
  1510.     /* basic machine hardware */
  1511.     {
  1512.         {
  1513.             CPU_M68000,
  1514.             10000000,
  1515.             hellfire_readmem,hellfire_writemem,0,0,
  1516.             toaplan1_interrupt,1
  1517.         },
  1518.         {
  1519.             CPU_Z80,
  1520.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1521.             sound_readmem,sound_writemem,hellfire_sound_readport,hellfire_sound_writeport,
  1522.             ignore_interrupt,0
  1523.         }
  1524.     },
  1525.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1526.     10,
  1527.     toaplan1_init_machine,
  1528.  
  1529.     /* video hardware */
  1530.     320, 256, { 0, 319, 16, 255 },
  1531.     gfxdecodeinfo,
  1532.     64*16+64*16, 64*16+64*16,
  1533.     0,
  1534.  
  1535.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1536.     toaplan1_eof_callback,
  1537.     toaplan1_vh_start,
  1538.     toaplan1_vh_stop,
  1539.     toaplan1_vh_screenrefresh,
  1540.  
  1541.     /* sound hardware */
  1542.     0,0,0,0,
  1543.     {
  1544.         {
  1545.             SOUND_YM3812,
  1546.             &ym3812_interface
  1547.         },
  1548.     }
  1549. };
  1550.  
  1551. static struct MachineDriver machine_driver_zerowing =
  1552. {
  1553.     /* basic machine hardware */
  1554.     {
  1555.         {
  1556.             CPU_M68000,
  1557.             10000000,
  1558.             zerowing_readmem,zerowing_writemem,0,0,
  1559.             toaplan1_interrupt,1
  1560.         },
  1561.         {
  1562.             CPU_Z80,
  1563.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1564.             sound_readmem,sound_writemem,zerowing_sound_readport,zerowing_sound_writeport,
  1565.             ignore_interrupt,0
  1566.         }
  1567.     },
  1568.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1569.     10,
  1570.     toaplan1_init_machine,
  1571.  
  1572.     /* video hardware */
  1573.     320, 256, { 0, 319, 16, 255 },
  1574.     gfxdecodeinfo,
  1575.     64*16+64*16, 64*16+64*16,
  1576.     0,
  1577.  
  1578.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1579.     toaplan1_eof_callback,
  1580.     toaplan1_vh_start,
  1581.     toaplan1_vh_stop,
  1582.     toaplan1_vh_screenrefresh,
  1583.  
  1584.     /* sound hardware */
  1585.     0,0,0,0,
  1586.     {
  1587.         {
  1588.             SOUND_YM3812,
  1589.             &ym3812_interface
  1590.         },
  1591.     }
  1592. };
  1593.  
  1594. static struct MachineDriver machine_driver_demonwld =
  1595. {
  1596.     /* basic machine hardware */
  1597.     {
  1598.         {
  1599.             CPU_M68000,
  1600.             10000000,
  1601.             demonwld_readmem,demonwld_writemem,0,0,
  1602.             toaplan1_interrupt,1
  1603.         },
  1604.         {
  1605.             CPU_Z80,
  1606.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1607.             sound_readmem,sound_writemem,demonwld_sound_readport,demonwld_sound_writeport,
  1608.             ignore_interrupt,0
  1609.         },
  1610.         {
  1611.             CPU_TMS320C10,
  1612.             28000000/8,        /* 3.5 MHz */
  1613.             DSP_readmem,DSP_writemem,DSP_readport,DSP_writeport,
  1614.             ignore_interrupt,0    /* IRQs are caused by 68000 */
  1615.         }
  1616.     },
  1617.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1618.     10,
  1619.     toaplan1_init_machine,
  1620.  
  1621.     /* video hardware */
  1622.     320, 256, { 0, 319, 16, 255 },
  1623.     gfxdecodeinfo,
  1624.     64*16+64*16, 64*16+64*16,
  1625.     0,
  1626.  
  1627.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1628.     toaplan1_eof_callback,
  1629.     toaplan1_vh_start,
  1630.     toaplan1_vh_stop,
  1631.     toaplan1_vh_screenrefresh,
  1632.  
  1633.     /* sound hardware */
  1634.     0,0,0,0,
  1635.     {
  1636.         {
  1637.             SOUND_YM3812,
  1638.             &ym3812_interface
  1639.         },
  1640.     }
  1641. };
  1642.  
  1643. static struct MachineDriver machine_driver_samesame =
  1644. {
  1645.     /* basic machine hardware */
  1646.     {
  1647.         {
  1648.             CPU_M68000,
  1649.             10000000,
  1650.             samesame_readmem,samesame_writemem,0,0,
  1651.             toaplan1_interrupt,1
  1652.         }
  1653.     },
  1654.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1655.     1,
  1656.     toaplan1_init_machine,
  1657.  
  1658.     /* video hardware */
  1659.     320, 240, { 0, 319, 0, 239 },
  1660.     gfxdecodeinfo,
  1661.     64*16+64*16, 64*16+64*16,
  1662.     0,
  1663.  
  1664.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1665.     samesame_eof_callback,
  1666.     toaplan1_vh_start,
  1667.     toaplan1_vh_stop,
  1668.     toaplan1_vh_screenrefresh,
  1669.  
  1670.     /* sound hardware */
  1671.     0,0,0,0,
  1672.     {
  1673.         {
  1674.             SOUND_YM3812,
  1675.             &ym3812_interface
  1676.         },
  1677.     }
  1678. };
  1679.  
  1680. static struct MachineDriver machine_driver_outzone =
  1681. {
  1682.     /* basic machine hardware */
  1683.     {
  1684.         {
  1685.             CPU_M68000,
  1686.             10000000,
  1687.             outzone_readmem,outzone_writemem,0,0,
  1688.             toaplan1_interrupt,1
  1689.         },
  1690.         {
  1691.             CPU_Z80,
  1692.             28000000/8,        /* 3.5Mhz (28Mhz Oscillator) */
  1693.             sound_readmem,sound_writemem,outzone_sound_readport,outzone_sound_writeport,
  1694.             ignore_interrupt,0
  1695.         }
  1696.     },
  1697.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1698.     10,
  1699.     toaplan1_init_machine,
  1700.  
  1701.     /* video hardware */
  1702.     320, 240, {0, 319, 0, 239 },
  1703.     outzone_gfxdecodeinfo,
  1704.     64*16+64*16, 64*16+64*16,
  1705.     0,
  1706.  
  1707.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1708.     toaplan1_eof_callback,
  1709.     toaplan1_vh_start,
  1710.     toaplan1_vh_stop,
  1711.     toaplan1_vh_screenrefresh,
  1712.  
  1713.     /* sound hardware */
  1714.     0,0,0,0,
  1715.     {
  1716.         {
  1717.             SOUND_YM3812,
  1718.             &ym3812_interface
  1719.         },
  1720.     }
  1721. };
  1722.  
  1723. static struct MachineDriver machine_driver_vimana =
  1724. {
  1725.     /* basic machine hardware */
  1726.     {
  1727.         {
  1728.             CPU_M68000,
  1729.             10000000,
  1730.             vimana_readmem,vimana_writemem,0,0,
  1731.             toaplan1_interrupt,1
  1732.         }
  1733.     },
  1734.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  1735.     1,
  1736.     toaplan1_init_machine,
  1737.  
  1738.     /* video hardware */
  1739.     320, 240, { 0, 319, 0, 239 },
  1740.     vm_gfxdecodeinfo,
  1741.     64*16+64*16, 64*16+64*16,
  1742.     0,
  1743.  
  1744.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK,
  1745.     toaplan1_eof_callback,
  1746.     toaplan1_vh_start,
  1747.     toaplan1_vh_stop,
  1748.     toaplan1_vh_screenrefresh,
  1749.  
  1750.     /* sound hardware */
  1751.     0,0,0,0,
  1752.     {
  1753.         {
  1754.             SOUND_YM3812,
  1755.             &ym3812_interface
  1756.         },
  1757.     }
  1758. };
  1759.  
  1760.  
  1761.  
  1762.  
  1763. /***************************************************************************
  1764.  
  1765.   Game driver(s)
  1766.  
  1767. ***************************************************************************/
  1768.  
  1769. ROM_START( rallybik )
  1770.     ROM_REGION( 0x080000, REGION_CPU1 )    /* Main 68K code */
  1771.     ROM_LOAD_EVEN( "b45-02.rom",  0x000000, 0x08000, 0x383386d7 )
  1772.     ROM_LOAD_ODD ( "b45-01.rom",  0x000000, 0x08000, 0x7602f6a7 )
  1773.     ROM_LOAD_EVEN( "b45-04.rom",  0x040000, 0x20000, 0xe9b005b1 )
  1774.     ROM_LOAD_ODD ( "b45-03.rom",  0x040000, 0x20000, 0x555344ce )
  1775.  
  1776.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1777.     ROM_LOAD( "b45-05.rom",  0x0000, 0x4000, 0x10814601 )
  1778.  
  1779.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1780.     ROM_LOAD( "b45-09.bin",  0x00000, 0x20000, 0x1dc7b010 )
  1781.     ROM_LOAD( "b45-08.bin",  0x20000, 0x20000, 0xfab661ba )
  1782.     ROM_LOAD( "b45-07.bin",  0x40000, 0x20000, 0xcd3748b4 )
  1783.     ROM_LOAD( "b45-06.bin",  0x60000, 0x20000, 0x144b085c )
  1784.  
  1785.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1786.     ROM_LOAD( "b45-11.rom",  0x00000, 0x10000, 0x0d56e8bb )
  1787.     ROM_LOAD( "b45-10.rom",  0x10000, 0x10000, 0xdbb7c57e )
  1788.     ROM_LOAD( "b45-12.rom",  0x20000, 0x10000, 0xcf5aae4e )
  1789.     ROM_LOAD( "b45-13.rom",  0x30000, 0x10000, 0x1683b07c )
  1790.  
  1791.     ROM_REGION( 0x240, REGION_PROMS )        /* nibble bproms, lo/hi order to be determined */
  1792.     ROM_LOAD( "b45-15.bpr",  0x000, 0x100, 0x24e7d62f )    /* sprite priority control ?? */
  1793.     ROM_LOAD( "b45-16.bpr",  0x100, 0x100, 0xa50cef09 )    /* sprite priority control ?? */
  1794.     ROM_LOAD( "b45-14.bpr",  0x200, 0x020, 0xf72482db )    /* sprite control ?? */
  1795.     ROM_LOAD( "b45-17.bpr",  0x220, 0x020, 0xbc88cced )    /* sprite attribute (flip/position) ?? */
  1796. ROM_END
  1797.  
  1798. ROM_START( truxton )
  1799.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1800.     ROM_LOAD_EVEN( "b65_11.bin",  0x000000, 0x20000, 0x1a62379a )
  1801.     ROM_LOAD_ODD ( "b65_10.bin",  0x000000, 0x20000, 0xaff5195d )
  1802.  
  1803.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1804.     ROM_LOAD( "b65_09.bin",  0x0000, 0x8000, 0xf1c0f410 )
  1805.  
  1806.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1807.     ROM_LOAD( "b65_08.bin",  0x00000, 0x20000, 0xd2315b37 )
  1808.     ROM_LOAD( "b65_07.bin",  0x20000, 0x20000, 0xfb83252a )
  1809.     ROM_LOAD( "b65_06.bin",  0x40000, 0x20000, 0x36cedcbe )
  1810.     ROM_LOAD( "b65_05.bin",  0x60000, 0x20000, 0x81cd95f1 )
  1811.  
  1812.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1813.     ROM_LOAD( "b65_04.bin",  0x00000, 0x20000, 0x8c6ff461 )
  1814.     ROM_LOAD( "b65_03.bin",  0x20000, 0x20000, 0x58b1350b )
  1815.     ROM_LOAD( "b65_02.bin",  0x40000, 0x20000, 0x1dd55161 )
  1816.     ROM_LOAD( "b65_01.bin",  0x60000, 0x20000, 0xe974937f )
  1817. ROM_END
  1818.  
  1819. ROM_START( hellfire )
  1820.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1821.     ROM_LOAD_EVEN( "b90-14.bin",  0x000000, 0x20000, 0x101df9f5 )
  1822.     ROM_LOAD_ODD ( "b90-15.bin",  0x000000, 0x20000, 0xe67fd452 )
  1823.  
  1824.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1825.     ROM_LOAD( "b90-03.bin",  0x0000, 0x8000, 0x4058fa67 )
  1826.  
  1827.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1828.     ROM_LOAD( "b90-04.bin",  0x00000, 0x20000, 0xea6150fc )
  1829.     ROM_LOAD( "b90-05.bin",  0x20000, 0x20000, 0xbb52c507 )
  1830.     ROM_LOAD( "b90-06.bin",  0x40000, 0x20000, 0xcf5b0252 )
  1831.     ROM_LOAD( "b90-07.bin",  0x60000, 0x20000, 0xb98af263 )
  1832.  
  1833.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1834.     ROM_LOAD( "b90-11.bin",  0x00000, 0x20000, 0xc33e543c )
  1835.     ROM_LOAD( "b90-10.bin",  0x20000, 0x20000, 0x35fd1092 )
  1836.     ROM_LOAD( "b90-09.bin",  0x40000, 0x20000, 0xcf01009e )
  1837.     ROM_LOAD( "b90-08.bin",  0x60000, 0x20000, 0x3404a5e3 )
  1838. ROM_END
  1839.  
  1840. ROM_START( zerowing )
  1841.     ROM_REGION( 0x080000, REGION_CPU1 )    /* Main 68K code */
  1842.     ROM_LOAD_EVEN( "o15-11.rom",  0x000000, 0x08000, 0x6ff2b9a0 )
  1843.     ROM_LOAD_ODD ( "o15-12.rom",  0x000000, 0x08000, 0x9773e60b )
  1844.     ROM_LOAD_EVEN( "o15-09.rom",  0x040000, 0x20000, 0x13764e95 )
  1845.     ROM_LOAD_ODD ( "o15-10.rom",  0x040000, 0x20000, 0x351ba71a )
  1846.  
  1847.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1848.     ROM_LOAD( "o15-13.rom",  0x0000, 0x8000, 0xe7b72383 )
  1849.  
  1850.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1851.     ROM_LOAD( "o15-05.rom",  0x00000, 0x20000, 0x4e5dd246 )
  1852.     ROM_LOAD( "o15-06.rom",  0x20000, 0x20000, 0xc8c6d428 )
  1853.     ROM_LOAD( "o15-07.rom",  0x40000, 0x20000, 0xefc40e99 )
  1854.     ROM_LOAD( "o15-08.rom",  0x60000, 0x20000, 0x1b019eab )
  1855.  
  1856.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1857.     ROM_LOAD( "o15-03.rom",  0x00000, 0x20000, 0x7f245fd3 )
  1858.     ROM_LOAD( "o15-04.rom",  0x20000, 0x20000, 0x0b1a1289 )
  1859.     ROM_LOAD( "o15-01.rom",  0x40000, 0x20000, 0x70570e43 )
  1860.     ROM_LOAD( "o15-02.rom",  0x60000, 0x20000, 0x724b487f )
  1861. ROM_END
  1862.  
  1863. ROM_START( demonwld )
  1864.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1865.     ROM_LOAD_EVEN( "rom10",  0x000000, 0x20000, 0x036ee46c )
  1866.     ROM_LOAD_ODD ( "rom09",  0x000000, 0x20000, 0xbed746e3 )
  1867.  
  1868.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1869.     ROM_LOAD( "rom11",  0x0000, 0x8000, 0x397eca1b )
  1870.  
  1871.     ROM_REGION( 0x10000, REGION_CPU3 )    /* Co-Processor TMS320C10 MCU code */
  1872.     ROM_LOAD_EVEN( "dsp_22.bin",  0x0000, 0x0800, 0x79389a71 )
  1873.     ROM_LOAD_ODD ( "dsp_21.bin",  0x0000, 0x0800, 0x2d135376 )
  1874.  
  1875.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1876.     ROM_LOAD( "rom05",  0x00000, 0x20000, 0x6506c982 )
  1877.     ROM_LOAD( "rom07",  0x20000, 0x20000, 0xa3a0d993 )
  1878.     ROM_LOAD( "rom06",  0x40000, 0x20000, 0x4fc5e5f3 )
  1879.     ROM_LOAD( "rom08",  0x60000, 0x20000, 0xeb53ab09 )
  1880.  
  1881.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1882.     ROM_LOAD( "rom01",  0x00000, 0x20000, 0x1b3724e9 )
  1883.     ROM_LOAD( "rom02",  0x20000, 0x20000, 0x7b20a44d )
  1884.     ROM_LOAD( "rom03",  0x40000, 0x20000, 0x2cacdcd0 )
  1885.     ROM_LOAD( "rom04",  0x60000, 0x20000, 0x76fd3201 )
  1886.  
  1887.     ROM_REGION( 0x40, REGION_PROMS )        /* nibble bproms, lo/hi order to be determined */
  1888.     ROM_LOAD( "prom12.bpr",  0x00, 0x20, 0xbc88cced )    /* sprite attribute (flip/position) ?? */
  1889.     ROM_LOAD( "prom13.bpr",  0x20, 0x20, 0xa1e17492 )    /* ??? */
  1890. ROM_END
  1891.  
  1892. ROM_START( samesame )
  1893.     ROM_REGION( 0x080000, REGION_CPU1 )    /* Main 68K code */
  1894.     ROM_LOAD_EVEN( "o17_09.bin",  0x000000, 0x08000, 0x3f69e437 )
  1895.     ROM_LOAD_ODD ( "o17_10.bin",  0x000000, 0x08000, 0x4e723e0a )
  1896.     ROM_LOAD_EVEN( "o17_11.bin",  0x040000, 0x20000, 0xbe07d101 )
  1897.     ROM_LOAD_ODD ( "o17_12.bin",  0x040000, 0x20000, 0xef698811 )
  1898.  
  1899.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound HD647180 code */
  1900.     /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */
  1901.     ROM_LOAD( "hd647180.017",  0x00000, 0x08000, 0x00000000 )
  1902.  
  1903.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1904.     ROM_LOAD( "o17_05.bin",  0x00000, 0x20000, 0x565315f8 )
  1905.     ROM_LOAD( "o17_06.bin",  0x20000, 0x20000, 0x95262d4c )
  1906.     ROM_LOAD( "o17_07.bin",  0x40000, 0x20000, 0x4c4b735c )
  1907.     ROM_LOAD( "o17_08.bin",  0x60000, 0x20000, 0x95c6586c )
  1908.  
  1909.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1910.     ROM_LOAD( "o17_01.bin",  0x00000, 0x20000, 0xea12e491 )
  1911.     ROM_LOAD( "o17_02.bin",  0x20000, 0x20000, 0x32a13a9f )
  1912.     ROM_LOAD( "o17_03.bin",  0x40000, 0x20000, 0x68723dc9 )
  1913.     ROM_LOAD( "o17_04.bin",  0x60000, 0x20000, 0xfe0ecb13 )
  1914. ROM_END
  1915.  
  1916. ROM_START( fireshrk )
  1917.     ROM_REGION( 0x080000, REGION_CPU1 )    /* Main 68K code */
  1918.     ROM_LOAD_EVEN( "9.bin",  0x000000, 0x08000, 0xf0c70e6f )
  1919.     ROM_LOAD_ODD ( "10.bin", 0x000000, 0x08000, 0x9d253d77 )
  1920.     ROM_LOAD_EVEN( "11.bin", 0x040000, 0x20000, 0x6beac378 )
  1921.     ROM_LOAD_ODD ( "12.bin", 0x040000, 0x20000, 0x6adb6eb5 )
  1922.  
  1923.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound HD647180 code */
  1924.     /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */
  1925.     ROM_LOAD( "hd647180.017",  0x00000, 0x08000, 0x00000000 )
  1926.  
  1927.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1928.     ROM_LOAD( "o17_05.bin",  0x00000, 0x20000, 0x565315f8 )
  1929.     ROM_LOAD( "o17_06.bin",  0x20000, 0x20000, 0x95262d4c )
  1930.     ROM_LOAD( "o17_07.bin",  0x40000, 0x20000, 0x4c4b735c )
  1931.     ROM_LOAD( "o17_08.bin",  0x60000, 0x20000, 0x95c6586c )
  1932.  
  1933.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1934.     ROM_LOAD( "o17_01.bin",  0x00000, 0x20000, 0xea12e491 )
  1935.     ROM_LOAD( "o17_02.bin",  0x20000, 0x20000, 0x32a13a9f )
  1936.     ROM_LOAD( "o17_03.bin",  0x40000, 0x20000, 0x68723dc9 )
  1937.     ROM_LOAD( "o17_04.bin",  0x60000, 0x20000, 0xfe0ecb13 )
  1938. ROM_END
  1939.  
  1940. ROM_START( outzone )
  1941.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1942.     ROM_LOAD_EVEN( "rom7.bin",  0x000000, 0x20000, 0x936e25d8 )
  1943.     ROM_LOAD_ODD ( "rom8.bin",  0x000000, 0x20000, 0xd19b3ecf )
  1944.  
  1945.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1946.     ROM_LOAD( "rom9.bin",  0x0000, 0x8000, 0x73d8e235 )
  1947.  
  1948.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1949.     ROM_LOAD( "rom5.bin",  0x00000, 0x80000, 0xc64ec7b6 )
  1950.     ROM_LOAD( "rom6.bin",  0x80000, 0x80000, 0x64b6c5ac )
  1951.  
  1952.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1953.     ROM_LOAD( "rom2.bin",  0x00000, 0x20000, 0x6bb72d16 )
  1954.     ROM_LOAD( "rom1.bin",  0x20000, 0x20000, 0x0934782d )
  1955.     ROM_LOAD( "rom3.bin",  0x40000, 0x20000, 0xec903c07 )
  1956.     ROM_LOAD( "rom4.bin",  0x60000, 0x20000, 0x50cbf1a8 )
  1957. ROM_END
  1958.  
  1959. ROM_START( outzonep )
  1960.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1961.     ROM_LOAD_EVEN( "18.bin",  0x000000, 0x20000, 0x31a171bb )
  1962.     ROM_LOAD_ODD ( "19.bin",  0x000000, 0x20000, 0x804ecfd1 )
  1963.  
  1964.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound Z80 code */
  1965.     ROM_LOAD( "rom9.bin",  0x0000, 0x8000, 0x73d8e235 )
  1966.  
  1967.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1968.     ROM_LOAD( "rom5.bin",  0x00000, 0x80000, 0xc64ec7b6 )
  1969.     ROM_LOAD( "rom6.bin",  0x80000, 0x80000, 0x64b6c5ac )
  1970. /* same data, different layout
  1971.     ROM_LOAD_GFX_EVEN( "04.bin",  0x000000, 0x10000, 0x3d11eae0 )
  1972.     ROM_LOAD_GFX_ODD ( "08.bin",  0x000000, 0x10000, 0xc7628891 )
  1973.     ROM_LOAD_GFX_EVEN( "13.bin",  0x080000, 0x10000, 0xb23dd87e )
  1974.     ROM_LOAD_GFX_ODD ( "09.bin",  0x080000, 0x10000, 0x445651ba )
  1975.     ROM_LOAD_GFX_EVEN( "03.bin",  0x020000, 0x10000, 0x6b347646 )
  1976.     ROM_LOAD_GFX_ODD ( "07.bin",  0x020000, 0x10000, 0x461b47f9 )
  1977.     ROM_LOAD_GFX_EVEN( "14.bin",  0x0a0000, 0x10000, 0xb28ae37a )
  1978.     ROM_LOAD_GFX_ODD ( "10.bin",  0x0a0000, 0x10000, 0x6596a076 )
  1979.     ROM_LOAD_GFX_EVEN( "02.bin",  0x040000, 0x10000, 0x11a781c3 )
  1980.     ROM_LOAD_GFX_ODD ( "06.bin",  0x040000, 0x10000, 0x1055da17 )
  1981.     ROM_LOAD_GFX_EVEN( "15.bin",  0x0c0000, 0x10000, 0x9c9e811b )
  1982.     ROM_LOAD_GFX_ODD ( "11.bin",  0x0c0000, 0x10000, 0x4c4d44dc )
  1983.     ROM_LOAD_GFX_EVEN( "01.bin",  0x060000, 0x10000, 0xe8c46aea )
  1984.     ROM_LOAD_GFX_ODD ( "05.bin",  0x060000, 0x10000, 0xf8a2fe01 )
  1985.     ROM_LOAD_GFX_EVEN( "16.bin",  0x0e0000, 0x10000, 0xcffcb99b )
  1986.     ROM_LOAD_GFX_ODD ( "12.bin",  0x0e0000, 0x10000, 0x90d37ded )
  1987. */
  1988.  
  1989.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1990.     ROM_LOAD( "rom2.bin",  0x00000, 0x20000, 0x6bb72d16 )
  1991.     ROM_LOAD( "rom1.bin",  0x20000, 0x20000, 0x0934782d )
  1992.     ROM_LOAD( "rom3.bin",  0x40000, 0x20000, 0xec903c07 )
  1993.     ROM_LOAD( "rom4.bin",  0x60000, 0x20000, 0x50cbf1a8 )
  1994. ROM_END
  1995.  
  1996. ROM_START( vimana )
  1997.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  1998.     ROM_LOAD_EVEN( "vim07.bin",  0x000000, 0x20000, 0x1efaea84 )
  1999.     ROM_LOAD_ODD ( "vim08.bin",  0x000000, 0x20000, 0xe45b7def )
  2000.  
  2001.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound HD647180 code */
  2002.     /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */
  2003.     ROM_LOAD( "hd647180.019",  0x00000, 0x08000, 0x00000000 )
  2004.  
  2005.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2006.     ROM_LOAD( "vim6.bin",  0x00000, 0x20000, 0x2886878d )
  2007.     ROM_LOAD( "vim5.bin",  0x20000, 0x20000, 0x61a63d7a )
  2008.     ROM_LOAD( "vim4.bin",  0x40000, 0x20000, 0xb0515768 )
  2009.     ROM_LOAD( "vim3.bin",  0x60000, 0x20000, 0x0b539131 )
  2010.  
  2011.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  2012.     ROM_LOAD( "vim1.bin",  0x00000, 0x80000, 0xcdde26cd )
  2013.     ROM_LOAD( "vim2.bin",  0x80000, 0x80000, 0x1dbfc118 )
  2014.  
  2015.     ROM_REGION( 0x40, REGION_PROMS )        /* nibble bproms, lo/hi order to be determined */
  2016.     ROM_LOAD( "tp019-09.bpr",  0x00, 0x20, 0xbc88cced )    /* sprite attribute (flip/position) ?? */
  2017.     ROM_LOAD( "tp019-10.bpr",  0x20, 0x20, 0xa1e17492 )    /* ??? */
  2018. ROM_END
  2019.  
  2020. ROM_START( vimana2 )
  2021.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  2022.     ROM_LOAD_EVEN( "vimana07.bin",  0x000000, 0x20000, 0x5a4bf73e )
  2023.     ROM_LOAD_ODD ( "vimana08.bin",  0x000000, 0x20000, 0x03ba27e8 )
  2024.  
  2025.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound HD647180 code */
  2026.     /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */
  2027.     ROM_LOAD( "hd647180.019",  0x00000, 0x08000, 0x00000000 )
  2028.  
  2029.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2030.     ROM_LOAD( "vim6.bin",  0x00000, 0x20000, 0x2886878d )
  2031.     ROM_LOAD( "vim5.bin",  0x20000, 0x20000, 0x61a63d7a )
  2032.     ROM_LOAD( "vim4.bin",  0x40000, 0x20000, 0xb0515768 )
  2033.     ROM_LOAD( "vim3.bin",  0x60000, 0x20000, 0x0b539131 )
  2034.  
  2035.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  2036.     ROM_LOAD( "vim1.bin",  0x00000, 0x80000, 0xcdde26cd )
  2037.     ROM_LOAD( "vim2.bin",  0x80000, 0x80000, 0x1dbfc118 )
  2038.  
  2039.     ROM_REGION( 0x40, REGION_PROMS )        /* nibble bproms, lo/hi order to be determined */
  2040.     ROM_LOAD( "tp019-09.bpr",  0x00, 0x20, 0xbc88cced )    /* sprite attribute (flip/position) ?? */
  2041.     ROM_LOAD( "tp019-10.bpr",  0x20, 0x20, 0xa1e17492 )    /* ??? */
  2042. ROM_END
  2043.  
  2044. ROM_START( vimanan )
  2045.     ROM_REGION( 0x040000, REGION_CPU1 )    /* Main 68K code */
  2046.     ROM_LOAD_EVEN( "tp019-07.rom",  0x000000, 0x20000, 0x78888ff2 )
  2047.     ROM_LOAD_ODD ( "tp019-08.rom",  0x000000, 0x20000, 0x6cd2dc3c )
  2048.  
  2049.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound HD647180 code */
  2050.     /* sound CPU is a HD647180 (Z180) with internal ROM - not yet supported */
  2051.     ROM_LOAD( "hd647180.019",  0x00000, 0x08000, 0x00000000 )
  2052.  
  2053.     ROM_REGION( 0x80000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2054.     ROM_LOAD( "vim6.bin",  0x00000, 0x20000, 0x2886878d )
  2055.     ROM_LOAD( "vim5.bin",  0x20000, 0x20000, 0x61a63d7a )
  2056.     ROM_LOAD( "vim4.bin",  0x40000, 0x20000, 0xb0515768 )
  2057.     ROM_LOAD( "vim3.bin",  0x60000, 0x20000, 0x0b539131 )
  2058.  
  2059.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  2060.     ROM_LOAD( "vim1.bin",  0x00000, 0x80000, 0xcdde26cd )
  2061.     ROM_LOAD( "vim2.bin",  0x80000, 0x80000, 0x1dbfc118 )
  2062.  
  2063.     ROM_REGION( 0x40, REGION_PROMS )        /* nibble bproms, lo/hi order to be determined */
  2064.     ROM_LOAD( "tp019-09.bpr",  0x00, 0x20, 0xbc88cced )    /* sprite attribute (flip/position) ?? */
  2065.     ROM_LOAD( "tp019-10.bpr",  0x20, 0x20, 0xa1e17492 )    /* ??? */
  2066. ROM_END
  2067.  
  2068.  
  2069.  
  2070. GAME ( 1988, rallybik, 0,        rallybik, rallybik, 0, ROT270, "[Toaplan] Taito Corporation", "Rally Bike / Dash Yarou" )
  2071. GAME ( 1988, truxton,  0,        truxton,  truxton,  0, ROT270, "[Toaplan] Taito Corporation", "Truxton / Tatsujin" )
  2072. GAME ( 1989, hellfire, 0,        hellfire, hellfire, 0, ROT0,   "Toaplan (Taito license)", "Hellfire" )
  2073. GAME ( 1989, zerowing, 0,        zerowing, zerowing, 0, ROT0,   "Toaplan", "Zero Wing" )
  2074. GAME ( 1989, demonwld, 0,        demonwld, demonwld, 0, ROT0,   "Toaplan (Taito license)", "Demon's World / Horror Story" )
  2075. GAMEX( 1990, fireshrk, 0,        samesame, fireshrk, 0, ROT270, "Toaplan", "Fire Shark", GAME_NO_SOUND )
  2076. GAMEX( 1989, samesame, fireshrk, samesame, samesame, 0, ROT270, "Toaplan", "Same! Same! Same!", GAME_NO_SOUND )
  2077. GAME ( 1990, outzone,  0,        outzone,  outzone,  0, ROT270, "Toaplan", "Out Zone" )
  2078. GAME ( 1990, outzonep, outzone,  outzone,  outzone,  0, ROT270, "bootleg", "Out Zone (bootleg)" )
  2079. GAMEX( 1991, vimana,   0,        vimana,   vimana,   0, ROT270, "Toaplan", "Vimana (set 1)", GAME_NO_SOUND )
  2080. GAMEX( 1991, vimana2,  vimana,   vimana,   vimana,   0, ROT270, "Toaplan", "Vimana (set 2)", GAME_NO_SOUND )
  2081. GAMEX( 1991, vimanan,  vimana,   vimana,   vimanan,  0, ROT270, "Toaplan (Nova Apparate GMBH & Co license)", "Vimana (Nova Apparate GMBH & Co)", GAME_NO_SOUND )
  2082.